﻿using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using SmartCity.Shared;
using Volo.Abp;
using Volo.Abp.AspNetCore.Mvc;

namespace CommonManagement
{
    /// <summary>
    /// 广告轮播控制器
    /// </summary>
    [RemoteService]
    [Area("commonManagement")]
    [Route("api/commonManagement/rotations")]
    public class RotationController : AbpController, IRotationAppService
    {
        private readonly IRotationAppService _rotationAppService;

        public RotationController(
            IRotationAppService rotationAppService)
        {
            _rotationAppService = rotationAppService;
        }

        // 1.6.1 查询引导页及主页轮播
        [HttpGet]
        [Route("list")]
        public Task<ListResponse<RotationDto>> PagedListAsync(PagedListRequest request, 
            string type= null)
        {
            return _rotationAppService.PagedListAsync(request, type);
        }
    }
}